package exercise6;

public class MyPoint {
	private double x,y;
	public MyPoint() {}
	public MyPoint(double x,double y){
		this.x=x;
		this.y=y;
	}
	public double getX() {
		return x;
	}
	public void setX(double x) {
		this.x = x;
	}
	public void setY(double y) {
		this.y = y;
	}
	public double getY() {
		return y;
	}
	public double distance(MyPoint p1,MyPoint p2) {
		double dis=Math.sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y));
		return dis;
	}
	
	
}
